﻿@namespace Masa.Tsc.Web.Admin.Rcl.Components
@inherits TscComponentBase

<MCard>
    <MCardText Style="background-color:#E9EDF7" Class="rounded-lg">
        <MRow>
            <MCol Cols=12>
                <MListItem Class="px-0">
                    <MListItemAvatar>
                        <MImage alt="Team Avatar" Src="@Value.Avatar"> </MImage>
                    </MListItemAvatar>
                    <MListItemContent>
                        <MListItemTitle Class="emphasis--text h8">@Value.Name</MListItemTitle>
                    </MListItemContent>
                </MListItem>
            </MCol>
            <MCol Cols=6 Class="regular--text"><span class="body2">@I18n.Team("Monitoring Projects")</span><span class="subtitle2">@($" {Value.ProjectTotal}")</span></MCol>
            <MCol Cols=6 Class="regular--text"><span class="body2">@I18n.Team("Monitoring Applications")</span><span class="subtitle2">@($" {Value.AppTotal}")</span></MCol>
        </MRow>
        <MRow>
            @foreach (var user in Value.Admins!)
            {
                <MCol Cols="@("auto")">
                    <MChip Color="#F0F3FA">
                        <MAvatar Left Color="#E9EDF7" Size="24">
                            <MImage Src="@user.Avatar" />
                        </MAvatar>
                        @user.Name
                    </MChip>
                </MCol>
            }
        </MRow>
        <MRow>
            <MCol Cols=12 Class="regular--text body2" Style="min-height:120px">
                @(Value.Description)
            </MCol>
        </MRow>
    </MCardText>
</MCard>

@code {
    [Parameter]
    public TeamDto Value { get; set; } = default!;
}